home *** CD-ROM | disk | FTP | other *** search
- Subject: Re: Colour.
- Date: Mon, 30 May 94 14:26:07 +0100
- From: sjg
- X-Mts: smtp
- Precedence: bulk
-
-
- > As I see it, the major issues with colour palette handling by GEM
- > programs are:
- >
- > - The standard 16 colours
- > - They're different under MultiTOS (right?)
- > - When should a program desire to change them?
-
- Basically I think you've got it right below.
-
- > - When should a user desire to change them?
-
- I don't see this as our concern - if a user wishes to change the colours,
- let him/her. Presumably (s)he has a good reason to do it...
-
- >
- > - Sharing colours
- > - No point each program allocating its own Purple
- > - When colours must be changed, it would be nice for
- > the actual palette change to be minimized (eg. purple
- > changes to dark purple, not green)
-
- The problem here is that GEM (unlike X) has no concept of shared colourmaps.
- All colour resources are global. This is a pity, but I can't see Atari doing
- anything about it. They could add the functionality to MultiTOS though.
- (eg: send a WM_REMAPCOLS on a window change)
-
- > - True Colour emulations
- > - Some programs use a 5x5x5 or 6x6x6 colourspace, and
- > these should all be the same space.
-
- Perhaps we need the equivalent of Visuals on a app-by-app basis. So an app
- could register its intent to use a 'type' of colourmap. So if we support
- 6x6x6 as PSEUDOTRUE, a STANDARD 256 and 16-entry (depending on display depth)
- colourmap, and a PRIVATE 256 & 16-entry colourmap, any app could know what
- type of colourmap is currently selected, and on receiving WM_TOPPED, could set
- its own colourmap if necessary.
-
- You'd end up with:
-
- main()
- {
- char cmsPresent =0;
-
- app = appl_init();
- if (getCookie("GCMS")) /* Gem Colour Management System */
- {
- cmsPresent = 1;
- cmsRegister(PRIVATE);
- cmsSetPalette(depth, uchar *R, uchar *G, uchar *B);
- cmsChangePalette();
- }
-
- ...
-
- in event loop:
-
- case WM_TOPPED:
- if (cmsPresent && (cmsGetCurrent() != colourMyType() ))
- cmsChangePalette();
- ...
- break;
-
- case WM_UNTOPPED: /* At last - a use for it! */
- cmsSetStandardPalette();
- break;
- ...
-
- /* Handle iconify similarly */
-
-
- Of course, the main drawback is that no current apps will support this, but
- since there isn't already a standard, I don't see that anything could get
- around this.
-
- I think the main problem is trying to take a colour allocation 'system' that
- was designed for a single-tasking environment and making it work in a multi-
- tasking environment. In that vein, I think the way we ought to go about it is
- to add functionality when something happens that couldn't have happened in the
- old system, ie: when a new app is topped.
-
- You could watch for 'mouse entering window', but to be honest, I fins that a
- pain on the X display. If you have a toolbar, and an image, assume that
- they're not joined together, then every time you select a tool the window
- colours go
- mad. (I'm thinking of the X application Tgif :-)
-
- The DSP decoder from Brainstorm works in the change-on-Topped fashion, and that
- works well. I showed it to friends who also use X and "5 out of 5 friends said
- that they preferred it" - but cattomeat Today (damn! - getting carried away :-)
-
- I'm dubious about whether changing on manipulation is a good idea. I suppose it
- is, but it makes implementation more difficult. If a user really needs to see
- the desktop files in C:\apps and the colours aren't letting him, then a click
- on
- the window should restore all.
-
- A program (GEMCMS.PRG) in the auto folder could register the cookie, and
- reserve mem for (say) 30 apps. Have a .cpx that llows you to configure this on
- the fly, and then you just need binding support (libgem.olb could incorporate
- it easily, lattice/pure/any other may have more difficulty - for these a
- separate lib may be necessary.)
-
- So what have I missed / how is it inadequate ?
-
- Simon.
-
-